Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: SIWE tutorial #459

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

docs: SIWE tutorial #459

wants to merge 3 commits into from

Conversation

matevz
Copy link
Member

@matevz matevz commented Nov 22, 2024

Fixes #338

PREVIEW

TODO: See if we can better adopt ERC-2771. Replacing authMsgSender() with _msgSender is one option. What about appending the token after the calldata? ERC-2771 uses this for transactions, but would this work for the queries too?

@matevz matevz changed the title Matevz/docs/siwe tutorial docs: SIWE tutorial Nov 22, 2024
Copy link

netlify bot commented Nov 22, 2024

Deploy Preview for oasisprotocol-sapphire-paratime ready!

Name Link
🔨 Latest commit a581f82
🔍 Latest deploy log https://app.netlify.com/sites/oasisprotocol-sapphire-paratime/deploys/677d57c7215089000848b982
😎 Deploy Preview https://deploy-preview-459--oasisprotocol-sapphire-paratime.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@matevz matevz force-pushed the matevz/docs/siwe-tutorial branch 4 times, most recently from 0c345f4 to 64b3602 Compare November 25, 2024 15:59
@matevz matevz marked this pull request as ready for review November 25, 2024 15:59
@matevz matevz force-pushed the matevz/docs/siwe-tutorial branch from 64b3602 to ea39756 Compare November 25, 2024 15:59
@matevz matevz force-pushed the matevz/docs/siwe-tutorial branch 2 times, most recently from ffd51aa to 6538060 Compare November 25, 2024 16:19
@matevz matevz requested a review from aefhm November 26, 2024 08:45
contracts/contracts/auth/A13e.sol Outdated Show resolved Hide resolved
contracts/contracts/auth/SiweAuth.sol Outdated Show resolved Hide resolved
contracts/contracts/auth/SiweAuth.sol Outdated Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
docs/authentication.md Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
@matevz matevz force-pushed the matevz/docs/siwe-tutorial branch from 6538060 to a581f82 Compare January 7, 2025 16:35
@@ -58,15 +63,15 @@ contract SiweAuth is A13e {
error AddressMismatch();
/// The Not before value in the SIWE message is still in the future
error NotBeforeInFuture();
/// The bearer token validity or the Expires value in the SIWE message is in the past
/// The authentication token validity or the Expires value in the SIWE message is in the past
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// The authentication token validity or the Expires value in the SIWE message is in the past
/// Validity of the authentication token or the Expires value in the SIWE message is in the past

* 1. The user-facing app calls `login()` which generates the authentication
* token on-chain.
* 2. Any smart contract method that requires authentication can take this token
* as an argument. Passing this token to `authMsgSender()` to verifies it
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* as an argument. Passing this token to `authMsgSender()` to verifies it
* as an argument. Passing this token to `authMsgSender()` verifies it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: SIWE tutorial and example
4 participants